package com.walle.concurrenttest.pattern.future;

/**
 * @author zhangjiapeng
 * @Package com.walle.concurrenttest.pattern.future
 * @Description: ${todo}
 * @date 2019/2/25 14:56
 */
public class Host {

    public FutureData request( int count,char c){
        System.out.println("Host requst " + c + " start");
        FutureData futureData = new FutureData();
        new Thread(() -> {
            RealData realData = new RealData(count,c);
            futureData.setData(realData);
        }).start();
        System.out.println("Host requst " + c + " end");
        return  futureData;
    }
}
